Skip to content

chore(fetch): refresh dependencies in place#71

Merged
baba-dev merged 2 commits into
mainfrom
codex/update-repository-cloning-logic
Sep 18, 2025
Merged

chore(fetch): refresh dependencies in place#71
baba-dev merged 2 commits into
mainfrom
codex/update-repository-cloning-logic

Conversation

@baba-dev
Copy link
Copy Markdown
Owner

Summary

  • detect existing dependency checkouts in fetch_repos.py
  • reuse the working tree with git fetch, checkout/reset, and submodule updates
  • document that fetch_repos.py refreshes pinned revisions in the README and dev setup guide

Testing

  • python -m compileall fetch_repos.py
  • npx --yes markdownlint-cli@0.39.0 docs/DEV_SETUP.md

https://chatgpt.com/codex/tasks/task_e_68cc86f5edc0832495a9f0214460de09

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread fetch_repos.py
Comment on lines +21 to +26
if repo_path.is_dir():
_run_git(['-C', str(repo_path), 'fetch', '--prune'])

if branch:
_run_git(['-C', str(repo_path), 'checkout', branch])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Fetch tags before checking out tag revisions

The refresh path only runs git fetch --prune before attempting git checkout <branch> when a dependency already exists. If the "branch" field in repos.json references a tag (all current entries do), git fetch --prune does not download new or updated tags. When the pinned tag changes (for example updating from v2.1.0 to v2.1.1) or a tag is re-pointed upstream, the checkout will fail with pathspec '<tag>' did not match any files and the dependencies cannot be refreshed in place. Consider fetching tags explicitly (e.g. git fetch --tags or git fetch origin tagname) before attempting the checkout so tag-based revisions can be updated.

Useful? React with 👍 / 👎.

@baba-dev baba-dev merged commit a8036fd into main Sep 18, 2025
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant